#pragma once
namespace lzf
{
	template<class T>
	struct list_node
	{
		list_node<T>* _next;
		list_node<T>* _prev;
		T  _date;
		list_node(const T& x)
			:_next(nullprt)
			,_prev(nullprt)
			,_date(x)
		{}
	};
	template<class T>
	class _list_iterator
	{
		typedef list_node<T>  node;
		node* _pnode;
		_list_iterator(node* p)
			:_pnode(p)
		{}
		T& operate* ()
		{
			return _pnode->_date;
		}
		_list_iterator<T>& opreate++()
		{
			_pnode = _pnode->next;
			return *this;
		}
	};
	template <class T>
	class list
	{
		typedef list_node<T> node;
		list()
		{
			_head = new node;
			_head->_next = _head;
			_head->_prev = _head;
		}
		void push_back(constn T& x)
		{
			node* newnode = new node(x);
			//node* tail=_head->prev;
			newnode->_next = _head;
			newnode->_prev = _head->_prev;
			_head->_prev->_next = newnode;
			_head->_prev = newnode;
		}
	private:
		node* _head;
	};


}